package com.kuang.fi;

import java.util.function.Consumer;

/**
 * @program: juc
 * @description:
 * @author: 陈恩涛
 * @create: 2021-03-22 16:20
 **/
public class Demo03 {
    public static void main(String[] args) {
        // 消费型接口，只有输入，没有返回值
//        Consumer<String> consumer = new Consumer<String>() {
////            @Override
////            public void accept(String s) {
////                System.out.println(s);
////            }
////        };

        Consumer<String> consumer = s -> {
            System.out.println(s);
        };

        consumer.accept("sad");
    }
}
